package com.example.rabc.monitor;

import java.util.HashMap;
import java.util.Map;

/**
 * 基础监控事件实现
 */
public class BaseMonitorEvent implements MonitorEvent {
    private final String eventType; // 事件类型
    private final long timestamp; // 事件时间戳
    private final Map<String, Object> data; // 事件数据
    
    public BaseMonitorEvent(String eventType, Map<String, Object> data) {
        this.eventType = eventType;
        this.timestamp = System.currentTimeMillis();
        this.data = new HashMap<>(data);
    }
    
    @Override
    public String getEventType() {
        return eventType;
    }
    
    @Override
    public long getTimestamp() {
        return timestamp;
    }
    
    @Override
    public Map<String, Object> getData() {
        return data;
    }
}